package com.huawei.appmarket.service.store.awk.card;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.FrameLayout;
import com.huawei.appgallery.foundation.card.base.card.BaseDistCard;
import com.huawei.appgallery.foundation.ui.framework.cardkit.bean.CardBean;
import com.huawei.appmarket.service.store.awk.bean.BlankCardBean;
import o.cgz;
import o.epv;
import o.evf;
import o.ewm.c;
import o.ewm.j;

public class BlankCard extends BaseDistCard {
    private Context ʽ;
    private View ˋ;

    public BlankCard(Context context) {
        super(context);
        this.ʽ = context;
    }

    public cgz ˏ(View view) {
        ʽ(view);
        this.ˋ = view.findViewById(j.ॱㆍ);
        evf.ॱ(this.ˋ, c.ʻॱ);
        return this;
    }

    public void ˏ(CardBean cardBean) {
        BlankCardBean blankCardBean = (BlankCardBean) cardBean;
        LayoutParams layoutParams = (FrameLayout.LayoutParams) this.ˋ.getLayoutParams();
        if (layoutParams == null) {
            layoutParams = new FrameLayout.LayoutParams(-1, -2);
        }
        if (blankCardBean.ॱ() == 1) {
            layoutParams.height = epv.ˋ(this.ˊˋ.getContext(), blankCardBean.ˊ());
        } else {
            layoutParams.height = blankCardBean.ˊ();
        }
        this.ˋ.setLayoutParams(layoutParams);
        if (blankCardBean.ʽ() != -1) {
            this.ˋ.setBackgroundColor(blankCardBean.ʽ());
        }
    }
}
